﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Private/Privada.master" AutoEventWireup="true"
    CodeBehind="Criar.aspx.cs" Inherits="HRP.Private.Agenda.Criar" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PrivadaMainContent" runat="server">
    <script type="text/javascript">
        jQuery(document).ready(function () {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

            function EndRequestHandler(sender, args) {
                initCalendar();
            }

            initCalendar();
        });
        function initCalendar() {
                        <%=idField %>
        }
    </script>
    <div class="page-heading animated fadeInDownBig">
        <h1>Criar Novo Evento</h1>
    </div>
    <!-- End page header -->
    <!-- Your awesome content goes here -->
    <asp:Panel ID="formPanel" runat="server">
        <div class="box-info full animated fadeInDown">
            <div id="myWizard">
                <section class="step" data-step-title="First step">
                    <div class="row">
                        <div class="col-sm-6">
                            <br />
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>Data Inicio</label>
                                        <asp:TextBox ID="dataInicioTB" class="form-control" runat="server" placeholder="Data Inicio"></asp:TextBox>
                                        <div class="has-error">
                                            <asp:RequiredFieldValidator CssClass="help-block" Display="Dynamic" ID="RequiredFieldValidator1" runat="server"
                                                Text="Campo Obrigatório" ValidationGroup="validaGroup" ControlToValidate="dataInicioTB"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>Data Fim</label>
                                        <asp:TextBox ID="dataFimTB" ValidationGroup="validaGroup" class="form-control" placeholder="Data Fim" runat="server"></asp:TextBox>
                                        <div class="has-error">
                                            <asp:RequiredFieldValidator CssClass="help-block" Display="Dynamic" ID="RequiredFieldValidator2" runat="server"
                                                Text="Campo Obrigatório" ValidationGroup="validaGroup" ControlToValidate="dataFimTB"></asp:RequiredFieldValidator>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-12">
                                    <div class="form-group">
                                        <div class="has-error">
                                            <asp:CompareValidator CssClass="help-block" Display="Dynamic" ID="CompareValidator1" runat="server"
                                                ValidationGroup="validaGroup" ControlToValidate="dataInicioTB" ControlToCompare="dataFimTB"
                                                Type="Date" Operator="LessThanEqual" Text="Data de fim não pode ser inferior á data de início"></asp:CompareValidator>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>Hora Inicio</label>
                                        <asp:DropDownList ID="horaInitDL" CssClass="form-control selectpicker" runat="server">
                                            <asp:ListItem>08:00</asp:ListItem>
                                            <asp:ListItem>08:30</asp:ListItem>
                                            <asp:ListItem>09:00</asp:ListItem>
                                            <asp:ListItem>09:30</asp:ListItem>
                                            <asp:ListItem>10:00</asp:ListItem>
                                            <asp:ListItem>10:30</asp:ListItem>
                                            <asp:ListItem>11:00</asp:ListItem>
                                            <asp:ListItem>11:30</asp:ListItem>
                                            <asp:ListItem>12:00</asp:ListItem>
                                            <asp:ListItem>12:30</asp:ListItem>
                                            <asp:ListItem>13:00</asp:ListItem>
                                            <asp:ListItem>13:30</asp:ListItem>
                                            <asp:ListItem>14:00</asp:ListItem>
                                            <asp:ListItem>14:30</asp:ListItem>
                                            <asp:ListItem>15:00</asp:ListItem>
                                            <asp:ListItem>15:30</asp:ListItem>
                                            <asp:ListItem>16:00</asp:ListItem>
                                            <asp:ListItem>16:30</asp:ListItem>
                                            <asp:ListItem>17:00</asp:ListItem>
                                            <asp:ListItem>17:30</asp:ListItem>
                                            <asp:ListItem>18:00</asp:ListItem>
                                            <asp:ListItem>18:30</asp:ListItem>
                                            <asp:ListItem>19:00</asp:ListItem>
                                            <asp:ListItem>19:30</asp:ListItem>
                                            <asp:ListItem>20:00</asp:ListItem>
                                            <asp:ListItem>20:30</asp:ListItem>
                                            <asp:ListItem>21:00</asp:ListItem>
                                            <asp:ListItem>21:30</asp:ListItem>
                                            <asp:ListItem>22:00</asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label>Hora Fim</label>
                                        <asp:DropDownList ID="horaFimDL" CssClass="form-control selectpicker" runat="server">
                                            <asp:ListItem>08:00</asp:ListItem>
                                            <asp:ListItem>08:30</asp:ListItem>
                                            <asp:ListItem>09:00</asp:ListItem>
                                            <asp:ListItem>09:30</asp:ListItem>
                                            <asp:ListItem>10:00</asp:ListItem>
                                            <asp:ListItem>10:30</asp:ListItem>
                                            <asp:ListItem>11:00</asp:ListItem>
                                            <asp:ListItem>11:30</asp:ListItem>
                                            <asp:ListItem>12:00</asp:ListItem>
                                            <asp:ListItem>12:30</asp:ListItem>
                                            <asp:ListItem>13:00</asp:ListItem>
                                            <asp:ListItem>13:30</asp:ListItem>
                                            <asp:ListItem>14:00</asp:ListItem>
                                            <asp:ListItem>14:30</asp:ListItem>
                                            <asp:ListItem>15:00</asp:ListItem>
                                            <asp:ListItem>15:30</asp:ListItem>
                                            <asp:ListItem>16:00</asp:ListItem>
                                            <asp:ListItem>16:30</asp:ListItem>
                                            <asp:ListItem>17:00</asp:ListItem>
                                            <asp:ListItem>17:30</asp:ListItem>
                                            <asp:ListItem>18:00</asp:ListItem>
                                            <asp:ListItem>18:30</asp:ListItem>
                                            <asp:ListItem>19:00</asp:ListItem>
                                            <asp:ListItem>19:30</asp:ListItem>
                                            <asp:ListItem>20:00</asp:ListItem>
                                            <asp:ListItem>20:30</asp:ListItem>
                                            <asp:ListItem>21:00</asp:ListItem>
                                            <asp:ListItem>21:30</asp:ListItem>
                                            <asp:ListItem>22:00</asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                            </div>
                            <% if (funcionarioLabel.Text.Length > 0)
                               { %>
                            <dl>
                                <dt>Funcionário</dt>
                                <dd>
                                <asp:Label ID="funcionarioLabel" Enabled="false" class="form-control" runat="server"></asp:Label></dd>
                            </dl>
                            <%} %>
                            <div class="form-group">
                                <label>Tipo Evento</label>
                                <asp:DropDownList ID="eventoDL" runat="server" CssClass="form-control selectpicker" DataTextField="evento" DataValueField="id"></asp:DropDownList>
                            </div>
                            <div class="form-group">
                                <label>Assunto</label>
                                <asp:TextBox ID="assuntoTB" class="form-control" runat="server"></asp:TextBox>
                                <div class="has-error">
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                                        Text="Campo Obrigatório" ValidationGroup="validaGroup" ControlToValidate="assuntoTB" CssClass="help-block" Display="Dynamic"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="form-group">
                                <label>Observação</label>
                                <asp:TextBox ID="observacaoTB" class="form-control" runat="server" TextMode="MultiLine" Rows="6"></asp:TextBox>
                            </div>
                        </div>
                        <div class="col-sm-6"><br />
                            <div class="notes">
                                <h4><strong>Ajuda</strong></h4>
                                <p style="text-align: justify">
                                    Ao criar um Evento terá de:
                                </p>
                                <ol>
                                    <strong>
                                        <li>Seleccionar Data Inicio e Data Fim do Evento</li>
                                        <li>A Data Inicio não pode ser superior á Data de Fim do Evento</li>
                                        <li>Seleccionar as horas de inicio e fim do evento.</li>
                                        <li>Seleccionar o Grupo a que pertence o evento</li>
                                    </strong>
                                </ol>
                                <asp:LinkButton ID="criarEventoBT" class="btn btn-primary" runat="server"
                                    ValidationGroup="validaGroup" OnClick="criarEventoBT_Click">Criar Evento</asp:LinkButton>
                            </div>
                        </div>
                    </div>
                </section>
                <asp:Label ID="Label1" runat="server" Text="" CssClass="alert alert-danger"></asp:Label>
            </div>
        </div>
    </asp:Panel>
    <asp:Panel ID="msgPanel" runat="server">
        <div class="alert alert-success alert-dismissable">
            Evento Criado com <strong>sucesso!</strong>
        </div>
    </asp:Panel>
</asp:Content>
